<template>
	<view class="customPendingTips">
		<view class="main">
			<view class="title"> {{ `$ ${money ? money : '0'}` }} </view>
			<view class="money_total">
				<view class="">
					{{ `訂單編號：${payOpt.order_no ? payOpt.order_no : ''}` }}</view
				>
				<view class="">
					{{
						`交易方式：${payType === '5' ? '儲值機' : ''}${
							payType === '6' ? '余额' : ''
						}${payType === '7' ? '儲值卡' : ''}`
					}}</view
				>
			</view>
			<!-- <view>数据集合2和 = {{ countMoney(messageSendArr) }}</view> -->
			<div class="btn_box">
				<view
					class="btn"
					@click="cancel"
					>取消</view
				>
				<view
					class="btn"
					@click="confirm"
					>確認</view
				>
			</div>
		</view>
	</view>
</template>

<script>
import useStore from '@/store/index.js';
import { countMoney } from '@/utils/countMoney';
export default {
	props: {
		money: {
			type: String,
			default: '',
		},
		payOpt: {
			type: Object,
			default: {},
		},
		payType: {
			type: String,
			default: '0',
		},
	},
	data() {
		return {};
	},
	methods: {
		jump(data) {
			let url = '';
			switch (data) {
				case 'service':
					url = '/pages/service/service';
					break;
				default:
			}
			uni.navigateTo({
				url,
			});
		},
		// 确认支付
		confirm() {
			this.$emit('handCountMoney');
		},
		// 取消支付
		cancel() {
			this.$emit('handCanel', 'zb');
		},
	},
};
</script>

<style lang="scss" scoped>
.customPendingTips {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;

	.main {
		// width: 100%;
		// height: 100%;
		padding: 30rpx 60rpx;
		border: 2rpx solid $uni-color-green;
		border-radius: 10rpx;
		color: $uni-color-green;
		background-color: $uni-color-white;
		display: flex;
		flex-direction: column;
		justify-content: space-between;

		.title {
			width: 500rpx;
			height: 150rpx;
			text-align: center;
			line-height: 150rpx;
		}
		.money_total {
			width: 500rpx;
			padding-bottom: 50rpx;
			text-align: left;
			line-height: 50rpx;
		}
		.btn_box {
			width: 500rpx;
			height: 100rpx;
			display: flex;
			justify-content: space-between;

			.btn {
				height: 30rpx;
				padding: 20rpx;
				line-height: 1;
				border-radius: 10rpx;
				color: $uni-color-white;
				background-color: $uni-color-green;
			}
		}
	}
}
</style>
